<template>
   <div>
  
      <el-card style="margin-top: 10px">
         <div ref="main" style="width: 800px; height: 400px"></div>
      </el-card>
   </div>
</template>

<script>
import * as echarts from "echarts"
import { getReport } from "../../../api/reports";

export default {
   name:'reports',
   data() {
      return {
         options: {},
      };
   },
   methods: { 
      async getInof() {
         try {
            let res = await getReport();
            console.log(res, "数据");
            this.options = res;
            const echart = echarts.init(this.$refs.main);
           
            console.log(echart,"11111");
            echart.setOption(this.options);
         } catch (error) {
            console.log(error);
         }
      },
      
   },
   
   created() {
      this.getInof();
   },
};
</script>

<style lang="scss" scoped>
</style>